//
//  UIBarButtonItem+CycleItem.h
//  CycleControlFunction
//
//  Created by ddy on 2018/8/7.
//  Copyright © 2018年 ddy. All rights reserved.
//  设置导航栏按钮

#import <UIKit/UIKit.h>

typedef void(^barbuttonActionBlock)(UIButton *button);

@interface UIBarButtonItem (CycleItem)


/** 点击的回调 ,此为 btn.actionBlock = (^){},此为点语法*/
//@property (nonatomic, copy) barbuttonActionBlock actionBlock;
/**
 * 1.创建导航按钮(只含图片)
 * @param target : 目标对象
 * @param frame  : 尺寸
 * @param action : 方法
 * @param normalImg  : 图片状态下的图片
 * @param highImg  : 高亮下的图片
 * @param edgeInsets : 图片edgeInsets
 */
+ (UIBarButtonItem *)cycle_itemWithTarget:(id)target action:(SEL)action frame:(CGRect)frame norImg:(NSString *)normalImg highImg:(NSString *)highImg imgEdgeInsets:(UIEdgeInsets)edgeInsets;
/**
 * 2.创建导航按钮(只有标题)
 */
+(UIBarButtonItem *)cycle_itenWithTarget:(id)target action:(SEL)action fSize:(CGFloat)fontSize WeightFont:(CGFloat)weight btnTAlignment:(NSTextAlignment)textAlignMent normalTitle:(NSString *)normalTitle normalColor:(UIColor *)normalColor frame:(CGRect)rectFrame TitleEdgeInsets:(UIEdgeInsets)edgeInsets;
/**
 * 3.创建按钮 (设置图片,sizeTofit方式)
 */
+ (UIBarButtonItem *)cycle_barButtonItemWithImage:(UIImage *)image highImage:(UIImage *)highImage target:(id)target action:(SEL)action;

@end
